<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>保养单预览</title>
    <link rel="stylesheet" href="/css/elementui/index.css">
    <link rel="stylesheet" href="/css/exam/css/style.css">
    <link rel="stylesheet" href="/iconfont/iconfont.css">
    <script src="/css/exam/js/httpVueLoader.js"></script>
    <style>
       body{
        width:100% !!important;
        margin: 0 auto !!important;
      
       }
       .main{
        width:500px;
        height:500px; 
        margin:0 auto
       }
    </style>
</head>
<body>
<div id="app">
  <div class="main">
   <iframe
  :src='url'
  width=500
  height=500
  frameborder='0'>
</iframe> 
  </div>

</div>
<script src="/css/exam/js/vue.js"></script>
<script src="/css/elementui/index.js"></script>
<script src="/css/exam/js/axios.min.js"></script>
<script>

const app = new Vue({
  el: '#app',
  data() {
    return { 
       file:'',
       url:'',
    }
  },
    created () {
    // let res  =  await axios.get(`/admin/getHtml?url=/storage/word/20230424/青岛金盾控股管理有限公司松岭路第二加油站物资盘点单.docx`)
    //  console.log('res',res.data);
    this.file =  this.getQueryVariableId('file')
    this.url = `/admin/getHtml?url=${this.file}`
  },
  methods: {
          	  //拿到页面file
			getQueryVariableId(variable) {
			var query = window.location.search.substring(1);
			var vars = query.split("&");
			for (var i = 0; i < vars.length; i++) {
			var pair = vars[i].split("=");
			if (pair[0] == variable) {
			return pair[1];
			}
			}
        },  
    }
  })

</script>
<style scoped>
  .el-table .el-table__cell:first-child{text-align: center;}
  .el-divider {
    margin:0;
  }



</style>
</body>
</html>


